<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>演示页面</title>
    <script src="layer.js"></script>
</head>

<body>
    <button id="alert">alert</button>
    <button id="msg">msg</button>
    <button id="loading">loading</button>
    <button id="confirm">confirm</button>
    <button id="success">success</button>
    <button id="error">error</button>
    <p>切换手机端观看最佳</p>
    <script>
        var alert = document.getElementById('alert');
        var msg = document.getElementById('msg');
        var loading = document.getElementById('loading');
        var confirm = document.getElementById('confirm');
        var success = document.getElementById('success');
        var error = document.getElementById('error');
        alert.onclick = function () {
            ui.alert('这是alert弹窗')
        }
        msg.onclick = function () {
            ui.msg('这是msg弹窗')
        }
        loading.onclick = function () {
            ui.loading('这是loading弹窗')
        }
        confirm.onclick = function () {
            ui.confirm('这是询问框', function () {
                window.alert('询问')
            })
        }
        success.onclick = function () {
            ui.success('成功提示框')
        }
        error.onclick = function () {
            ui.error('失败提示框')
        }
    </script>
</body>

</html>